package org.clockworkmages.games.anno1186.model.item;

import java.util.ArrayList;
import java.util.List;

import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;

import org.clockworkmages.games.anno1186.model.GameObject;
import org.clockworkmages.games.anno1186.model.effect.Effect;
import org.clockworkmages.games.anno1186.model.option.GenericOption;

public class Item
		extends GameObject {

	private String name;

	private String description;

	private int value;

	private String sellableCondition;

	private List<Effect> equippedEffects = new ArrayList<Effect>();

	private String equipmentSlotId;

	/**
	 * Options that should be available for that item.
	 */
	private List<GenericOption> useOptions = new ArrayList<GenericOption>();

	private String itemType;

	public Item() {

	}

	public Item(String id, String name, String description) {
		super(id);
		this.name = name;
		this.description = description;
	}

	@XmlElement(name = "effect")
	public List<Effect> getEffects() {
		return equippedEffects;
	}

	public void setEffects(List<Effect> effects) {
		this.equippedEffects = effects;
	}

	@XmlAttribute(name = "slot")
	public String getEquipmentSlotId() {
		return equipmentSlotId;
	}

	public void setEquipmentSlotId(String equipmentSlotId) {
		this.equipmentSlotId = equipmentSlotId;
	}

	@XmlAttribute(name = "type")
	public String getItemType() {
		return itemType;
	}

	public void setItemType(String itemType) {
		this.itemType = itemType;
	}

	@XmlAttribute(name = "name")
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@XmlAttribute(name = "description")
	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	@XmlAttribute(name = "value")
	public int getValue() {
		return value;
	}

	public void setValue(int value) {
		this.value = value;
	}

	@XmlAttribute(name = "sellableIf")
	public String getSellableCondition() {
		return sellableCondition;
	}

	public void setSellableCondition(String sellableCondition) {
		this.sellableCondition = sellableCondition;
	}

	@XmlElement(name = "equippedEffect")
	public List<Effect> getEquippedEffects() {
		return equippedEffects;
	}

	public void setEquippedEffects(List<Effect> equipEffects) {
		this.equippedEffects = equipEffects;
	}

	@XmlElement(name = "useOption")
	public List<GenericOption> getUseOptions() {
		return useOptions;
	}

	public void setUseOptions(List<GenericOption> useOptions) {
		this.useOptions = useOptions;
	}

}
